package org.rpgmapper.database;

public class DBConstants {
	
	/**
	 * la BD
	 */
	public static final int DATABASE_VERSION = 1;
	public static final String DATABASE_NAME = "rpgmapper.db";
    
	public static final String ID_COL_NAME = "ROWID";//il s'autoincremente

    /**
     * Pour les Characters
     */
	public static final String TYPE_COL_NAME = "TYPE";//il s'autoincremente
	public static final String CHARACTER_TABLE_NAME = "CHARACTER";
	public static final String NAME_COL_NAME = "NAME";
	public static final String SIDE_COL_NAME = "SIDE";
	public static final String HITPOINTS_COL_NAME = "HITPOINTS";
	public static final String MAX_HITPOINTS_COL_NAME = "MAX_HITPOINTS";
	public static final String INITIATIVE_COL_NAME = "INITIATIVE";
	public static final String AC_COL_NAME = "AC";
	public static final String MOVEPOINTS_COL_NAME = "MOVEPOINTS";
	public static final String MAX_MOVEPOINTS_COL_NAME = "MAX_MOVEPOINTS";
	public static final String MONEY_COL_NAME = "MONEY";

	public static final String CHARACTER_TABLE_DROP =
        "DROP TABLE IF EXISTS " + CHARACTER_TABLE_NAME + ";";
    
	public static final String CHARACTER_TABLE_DELETE_ALL =
        "DELETE FROM " + CHARACTER_TABLE_NAME + ";";
    
	public static final String CHARACTER_TABLE_CREATE =
                "CREATE TABLE " + CHARACTER_TABLE_NAME + " (" +
                TYPE_COL_NAME + " NUM, " +
                NAME_COL_NAME + " TEXT, " +
                SIDE_COL_NAME + " NUM, " +
                HITPOINTS_COL_NAME + " NUM, " +
                MAX_HITPOINTS_COL_NAME + " NUM, " +
                INITIATIVE_COL_NAME + " NUM, " +
                AC_COL_NAME + " NUM, " +
                MOVEPOINTS_COL_NAME + " NUM, " +
                MAX_MOVEPOINTS_COL_NAME + " NUM, " +
                MONEY_COL_NAME + " NUM " +
                ");";

	/*public static final String CHARACTER_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" +
        TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME
        + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME
        + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME
        + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME+ ") VALUES (" +
        "__"+TYPE_COL_NAME+"__, __"+NAME_COL_NAME+"__, __"+SIDE_COL_NAME+"__, __"+HITPOINTS_COL_NAME+"__, __"+MAX_HITPOINTS_COL_NAME
        +"__, __"+INITIATIVE_COL_NAME+"__, __"+AC_COL_NAME+"__, __"+MOVEPOINTS_COL_NAME+"__, __"+MAX_MOVEPOINTS_COL_NAME+"__"+
        ");";*/
	public static final String AYRIA_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (1, 'Ayria', 4, 20, 20, 12, 14, 6, 6, 0"+ ");";
	public static final String FOA_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (1, 'Foa', 2, 20, 20, 12, 14, 6, 6, 0"+ ");";
	public static final String CALKIN_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (1, 'Calkin', 1, 20, 20, 12, 14, 6, 6, 0"+ ");";
	public static final String KEEMUN_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (1, 'Keemun', 1, 20, 20, 12, 14, 6, 6, 0"+ ");";

    public static final String ELF_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (2, 'Elfe', 0, 20, 20, 12, 14, 6, 6, 0"+ ");";
    public static final String FLY_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (2, 'Baby Fly', 0, 20, 20, 12, 14, 6, 6, 0"+ ");";
    public static final String TROLL_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (2, 'Troll', 0, 20, 20, 12, 14, 6, 6, 0"+ ");";
    public static final String GOBLIN_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (2, 'Gobelin', 0, 20, 20, 12, 14, 6, 6, 0"+ ");";
    public static final String GIANT_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (2, 'Giant', 0, 20, 20, 12, 14, 6, 6, 0"+ ");";
    public static final String GOD_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (2, 'God', 0, 20, 20, 12, 14, 6, 6, 0"+ ");";
    public static final String PIXIE_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (2, 'Pixie', 0, 20, 20, 12, 14, 6, 6, 0"+ ");";
    public static final String HALF_ORC_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (2, 'Half-orc', 0, 20, 20, 12, 14, 6, 6, 0"+ ");";
    public static final String WARRIOR_INSERT =
        "INSERT INTO " + CHARACTER_TABLE_NAME + " (" + TYPE_COL_NAME + ", " + NAME_COL_NAME + ", " + SIDE_COL_NAME + ", " + HITPOINTS_COL_NAME + ", " + MAX_HITPOINTS_COL_NAME + ", " + INITIATIVE_COL_NAME + ", " + AC_COL_NAME + ", " + MOVEPOINTS_COL_NAME + ", " + MAX_MOVEPOINTS_COL_NAME + ", " + MONEY_COL_NAME +
        ") VALUES (2, 'Warrior', 0, 20, 20, 12, 14, 6, 6, 0"+ ");";

	
    /**
     * Pour les Bonus
     */
	public static final String BONUS_TABLE_NAME = "BONUS";

	public static final String LABEL_COL_NAME = "LABEL";
	public static final String CHARID_COL_NAME = "CHAR_ID";

	public static final String BONUS_TABLE_DROP =
        "DROP TABLE IF EXISTS " + BONUS_TABLE_NAME + ";";
    
	public static final String BONUS_TABLE_DELETE_ALL =
        "DELETE FROM " + BONUS_TABLE_NAME + ";";
    
	public static final String BONUS_TABLE_CREATE =
                "CREATE TABLE " + BONUS_TABLE_NAME + " (" +
                LABEL_COL_NAME + " TEXT, " +
                CHARID_COL_NAME + " NUM, " +
                "FOREIGN KEY(" + CHARID_COL_NAME + ") REFERENCES " + CHARACTER_TABLE_NAME + "(" + ID_COL_NAME + ")" +
                ");";

}
